package ex1;

/**
 * @author: knowno
 * @create: 2024-09-06 09:03
 * @Version 1.0
 **/
public class TestCalc {


    /**
     * 参数为父类的引用
     * @param shape
     */
    public static void calcArea(MyShape shape) {
//        System.out.println(shape.getArea());
        System.out.printf("面积是: %.2f\n",shape.getArea());

    }
    /**
     * 参数为父类的引用
     * @param shape
     */
    public static void calcLen(MyShape shape) {
//        System.out.println(shape.getLen());
        System.out.printf("周长是: %.2f\n",shape.getLen());

    }
}
